package com.atguigu.gmall.activity.client;

import com.atguigu.gmall.activity.client.impl.SeckillDegradeFeignClient;
import com.atguigu.gmall.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;

@FeignClient(value = "service-activity",fallback = SeckillDegradeFeignClient.class)
public interface SeckillFeignClient {


    /**
     * api/activity/seckill/auth/trade
     * 秒杀下单确认
     * @return
     */
    @GetMapping("/api/activity/seckill/auth/trade")
    public Result trade();
    /**
     * api/activity/seckill/getSeckillGoods/{skuId}
     * 查询秒杀商品详情
     * @param skuId
     * @return
     */
    @GetMapping("/api/activity/seckill/getSeckillGoods/{skuId}")
    public Result getSeckillGoods(@PathVariable Long skuId);
    /**
     * api/activity/seckill/findAll
     * 查询秒杀商品列表
     * @return
     */
    @GetMapping("/api/activity/seckill/findAll")
    public Result findAll();
}
